/*
-----------------------------------------------------------------------------
This source file is part of Labor3D
(Labor 3D Graphics Engine)

Copyright (c) 2011-2020 Rock Mao
* creator : Rock Mao
* created : 2011-5-2   22:29
* filename: LaborD3D11Texture.h
-----------------------------------------------------------------------------
*/
#ifndef __LABORD3D11TEXTURE_H__
#define __LABORD3D11TEXTURE_H__

#include "LaborD3D11Def.h"
#include "LaborD3D11Headers.h"
#include "LaborD3D11Device.h"
#include "Renderer\LaborTexture.h"

NAMESPACE_LABOR3D_BEGIN

class CLD3D11RenderSystem;

//class CD3D10TextureWrapper
//{
//public:
//	int                        m_Width;
//	int                        m_Height;
//
//	int                        m_TexHeight;
//	int                        m_TexWidth;
//
//	int                        m_nByteAlign;
//	int                        m_initValue;
//	CLD3D11Device*             m_pDevice;
//	ID3D11ShaderResourceView*  m_pD3DTexture;
//	int                        m_nComponent;
//	int                        m_Offset;
//	int                        m_Pitch;
//	bool                       m_bLockable;
//
//public:
//	CD3D10TextureWrapper();
//	float                        getMax_U();
//	float                        getMax_V();
//	void                         setTextureSize(int w , int h , int texW , int texH);
//	void                         __destoryD3DTexture(CLD3D11RenderSystem* pRenderer);
//	ID3D11ShaderResourceView*    __createTexture(int w , int h, bool bRenderTarget,CLD3D11RenderSystem* pRenderer);
//	void                         __unload(CLD3D11RenderSystem* pRenderer);
//	void                         __InitTexture(bool bRenderTarget,CLD3D11RenderSystem* pRenderer);
//	//bool                         __uploadSurfaceData(IDirect3DSurface9* pSurface , const char* pData);
//	bool                         __uploadUnlockableTexture(const char* pData);
//	bool                         __uploadTexture(const char* pData);
//};


class CLD3D11BasicTexture : public CLTexture
{
protected:
	CLD3D11RenderSystem*        m_pRenderer;
public:
	DECL_BASE_OBJECT_DLLSAFE(CLD3D11BasicTexture);

	CLD3D11BasicTexture(CLD3D11RenderSystem* pDevice);
	virtual ~CLD3D11BasicTexture();
	virtual bool                        setShader(){return false;}
	virtual bool                        unsetShader(){return false;}
	virtual bool                        convert2RGBTexture(){return false;}
	virtual ID3D11ShaderResourceView*   getTexLayer(int iLayer = 0 ) = 0;
	virtual int                         nTexLayer() = 0;
	virtual void*                       toRenderTarget(){ return NULL;}
	virtual bool                        grabRenderTargetData(int x , int y , int w , int h , void* data , int dataLen) { return false ; }
};
NAMESPACE_LABOR3D_END
#endif // __LABORD3D11TEXTURE_H__
